#include "abstract_factory.h"

#include <iostream>

int main(int argc, char** argv)
{
	AbstractFactory* factory = new Factory1();
	AbstractProductA* product_a = factory->CreateProductA();
	AbstractProductB* product_b = factory->CreateProductB();
	product_a->OperationA();
	product_b->OperationB();
	
	delete factory;
	factory = NULL;
	delete product_a;
	product_a = NULL;
	delete product_b;
	product_b = NULL;
	
	factory = new Factory2();
	product_a = factory->CreateProductA();
	product_b = factory->CreateProductB();
	product_a->OperationA();
	product_b->OperationB();
	
	delete factory;
	factory = NULL;
	delete product_a;
	product_a = NULL;
	delete product_b;
	product_b = NULL;
	
	return 0;
}